// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

mod mod_auth;
mod mod_base;
mod mod_stor;

mod app_mu_stor;
mod app_mu_tauri;
mod app_os_auth_1_0;
mod app_os_base_1_0;

use app_mu_stor as app_stor;
use app_os_auth_1_0 as app_auth;
use app_os_base_1_0 as app_base;

use std::env;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![
            app_auth::verify_lic_cmd,
            app_auth::gen_actoken_cmd,
            app_auth::active_license_cmd,
            app_base::get_sys_info_cmd,
            app_base::select_folder_cmd,
            app_base::set_autolaunch_cmd,
            app_stor::get_app_conf_cmd,
            app_stor::set_app_conf_cmd,
            app_mu_tauri::list_usb_cmd,
            app_mu_tauri::rcios_read_cmd,
            app_mu_tauri::get_mux_conf_cmd,
            app_mu_tauri::set_mux_conf_cmd,
        ])
        .run(tauri::generate_context!())?;
    anyhow::Ok(())
}
